home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / E_Lib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  7.2 KB  |  247 lines

  1. /*
  2.  * vim:ts=8:sw=3:sts=3:noexpandtab:cino=>5n-3f0^-2{2
  3.  */
  4. #ifndef _E_H
  5. #define _E_H
  6.  
  7. #ifdef EAPI
  8. #undef EAPI
  9. #endif
  10. #ifdef WIN32
  11. # ifdef BUILDING_DLL
  12. #  define EAPI __declspec(dllexport)
  13. # else
  14. #  define EAPI __declspec(dllimport)
  15. # endif
  16. #else
  17. # ifdef __GNUC__
  18. #  if __GNUC__ >= 4
  19. #   define EAPI __attribute__ ((visibility("default")))
  20. #  else
  21. #   define EAPI
  22. #  endif
  23. # else
  24. #  define EAPI
  25. # endif
  26. #endif
  27.  
  28. typedef enum E_Lib_Binding_Context
  29. {
  30.    E_LIB_BINDING_CONTEXT_NONE,
  31.    E_LIB_BINDING_CONTEXT_UNKNOWN,
  32.    E_LIB_BINDING_CONTEXT_BORDER,
  33.    E_LIB_BINDING_CONTEXT_ZONE,
  34.    E_LIB_BINDING_CONTEXT_CONTAINER,
  35.    E_LIB_BINDING_CONTEXT_MANAGER,
  36.    E_LIB_BINDING_CONTEXT_MENU,
  37.    E_LIB_BINDING_CONTEXT_WINLIST,
  38.    E_LIB_BINDING_CONTEXT_ANY
  39. } E_Lib_Binding_Context;
  40.  
  41. typedef enum E_Lib_Binding_Modifier
  42. {
  43.    E_LIB_BINDING_MODIFIER_NONE = 0,
  44.    E_LIB_BINDING_MODIFIER_SHIFT = (1 << 0),
  45.    E_LIB_BINDING_MODIFIER_CTRL = (1 << 1),
  46.    E_LIB_BINDING_MODIFIER_ALT = (1 << 2),
  47.    E_LIB_BINDING_MODIFIER_WIN = (1 << 3)
  48. } E_Lib_Binding_Modifier;
  49.  
  50. typedef struct _E_Response_Module_List E_Response_Module_List;
  51. typedef struct _E_Response_Module_Data E_Response_Module_Data;
  52. typedef struct _E_Response_Dirs_List E_Response_Dirs_List;
  53. typedef struct _E_Response_Background_Get E_Response_Background_Get;
  54. typedef struct _E_Response_Language_Get E_Response_Language_Get;
  55. typedef struct _E_Response_Theme_Get E_Response_Theme_Get;
  56.  
  57. typedef struct _E_Response_Binding_Mouse_List E_Response_Binding_Mouse_List;
  58. typedef struct _E_Response_Binding_Mouse_Data E_Response_Binding_Mouse_Data;
  59. typedef struct _E_Response_Binding_Key_List E_Response_Binding_Key_List;
  60. typedef struct _E_Response_Binding_Key_Data E_Response_Binding_Key_Data;
  61. typedef struct _E_Response_Binding_Signal_List E_Response_Binding_Signal_List;
  62. typedef struct _E_Response_Binding_Signal_Data E_Response_Binding_Signal_Data;
  63. typedef struct _E_Response_Binding_Wheel_List E_Response_Binding_Wheel_List;
  64. typedef struct _E_Response_Binding_Wheel_Data E_Response_Binding_Wheel_Data;
  65.  
  66. struct _E_Response_Module_List
  67. {
  68.     E_Response_Module_Data    **modules;
  69.     int             count;
  70. };
  71.  
  72. struct _E_Response_Module_Data
  73. {
  74.    char   *name;
  75.    char    enabled;
  76. };
  77.  
  78. struct _E_Response_Dirs_List
  79. {
  80.    char   **dirs;
  81.    int        count;
  82. };
  83.  
  84. struct _E_Response_Background_Get
  85. {
  86.    char   *file;
  87. };
  88.  
  89. struct _E_Response_Theme_Get
  90. {
  91.    char   *file;
  92.    char   *category;
  93. };
  94.  
  95. struct _E_Response_Language_Get
  96. {
  97.    char   *lang;
  98. };
  99.  
  100. struct _E_Response_Binding_Key_List
  101. {
  102.     E_Response_Binding_Key_Data    **bindings;
  103.     int                     count;
  104. };
  105.  
  106. struct _E_Response_Binding_Key_Data
  107. {
  108.    E_Lib_Binding_Context ctx;
  109.    char *key;
  110.    E_Lib_Binding_Modifier mod;
  111.    unsigned char any_mod : 1;
  112.    char *action;
  113.    char *params;
  114. };
  115.  
  116. struct _E_Response_Binding_Mouse_List
  117. {
  118.     E_Response_Binding_Mouse_Data    **bindings;
  119.     int                          count;
  120. };
  121.  
  122. struct _E_Response_Binding_Mouse_Data
  123. {
  124.    E_Lib_Binding_Context ctx;
  125.    int button;
  126.    E_Lib_Binding_Modifier mod;
  127.    unsigned char any_mod : 1;
  128.    char *action;
  129.    char *params;
  130. };
  131.  
  132. struct _E_Response_Binding_Signal_List
  133. {
  134.     E_Response_Binding_Signal_Data **bindings;
  135.     int                     count;
  136. };
  137.  
  138. struct _E_Response_Binding_Signal_Data
  139. {
  140.    E_Lib_Binding_Context ctx;
  141.    char *signal;
  142.    char *source;
  143.    E_Lib_Binding_Modifier mod;
  144.    unsigned char any_mod : 1;
  145.    char *action;
  146.    char *params;
  147. };
  148.  
  149. struct _E_Response_Binding_Wheel_List
  150. {
  151.     E_Response_Binding_Wheel_Data  **bindings;
  152.     int                     count;
  153. };
  154.  
  155. struct _E_Response_Binding_Wheel_Data
  156. {
  157.    E_Lib_Binding_Context ctx;
  158.    int direction;
  159.    int z;
  160.    E_Lib_Binding_Modifier mod;
  161.    unsigned char any_mod : 1;
  162.    char *action;
  163.    char *params;
  164. };
  165.  
  166.  
  167. extern EAPI int E_RESPONSE_MODULE_LIST;
  168. extern EAPI int E_RESPONSE_BACKGROUND_GET;
  169. extern EAPI int E_RESPONSE_LANGUAGE_GET;
  170. extern EAPI int E_RESPONSE_THEME_GET;
  171.  
  172. extern EAPI int E_RESPONSE_DATA_DIRS_LIST;
  173. extern EAPI int E_RESPONSE_IMAGE_DIRS_LIST;
  174. extern EAPI int E_RESPONSE_FONT_DIRS_LIST;
  175. extern EAPI int E_RESPONSE_THEME_DIRS_LIST;
  176. extern EAPI int E_RESPONSE_INIT_DIRS_LIST;
  177. extern EAPI int E_RESPONSE_ICON_DIRS_LIST;
  178. extern EAPI int E_RESPONSE_MODULE_DIRS_LIST;
  179. extern EAPI int E_RESPONSE_BACKGROUND_DIRS_LIST;
  180.  
  181. extern EAPI int E_RESPONSE_BINDING_KEY_LIST;
  182. extern EAPI int E_RESPONSE_BINDING_MOUSE_LIST;
  183. extern EAPI int E_RESPONSE_BINDING_SIGNAL_LIST;
  184. extern EAPI int E_RESPONSE_BINDING_WHEEL_LIST;
  185.  
  186. #ifdef __cplusplus
  187. extern "C" {
  188. #endif
  189.  
  190.    /* library startup and shutdown */
  191.    EAPI int          e_lib_init                       (const char *display);
  192.    EAPI int          e_lib_shutdown                   (void);
  193.  
  194.    /* E startup and shutdown */
  195.    EAPI void         e_lib_restart                    (void);
  196.    EAPI void         e_lib_quit                       (void);
  197.  
  198.    EAPI void         e_lib_config_panel_show          (void);
  199.  
  200.    /* E module manipulation */
  201.    EAPI void         e_lib_module_enabled_set         (const char *module, int enable);
  202.    EAPI void         e_lib_module_loaded_set          (const char *module, int load);
  203.    EAPI void         e_lib_module_list                (void);
  204.  
  205.    /* E desktop manipulation */
  206.    EAPI void         e_lib_background_set             (const char *bgfile);
  207.    EAPI void         e_lib_background_get             (void);
  208.    EAPI void         e_lib_desktop_background_add     (const int con, const int zone, const int desk_x, const int desk_y, const char *bgfile);
  209.    EAPI void         e_lib_desktop_background_del     (const int con, const int zone, const int desk_x, const int desk_y);
  210.  
  211.    /* key/mouse bindings */
  212.    EAPI void         e_lib_bindings_key_list          (void);
  213.    EAPI void         e_lib_binding_key_del          (unsigned int context, unsigned int modifiers, const char *key, 
  214.                                unsigned int any_mod, const char *action, const char *params);
  215.    EAPI void         e_lib_binding_key_add          (unsigned int context, unsigned int modifiers, const char *key, 
  216.                                unsigned int any_mod, const char *action, const char *params);
  217.  
  218.    EAPI void         e_lib_bindings_mouse_list          (void);
  219.    EAPI void         e_lib_binding_mouse_del          (unsigned int context, unsigned int modifiers, unsigned int button, 
  220.                                unsigned int any_mod, const char *action, const char *params);
  221.    EAPI void         e_lib_binding_mouse_add          (unsigned int context, unsigned int modifiers, unsigned int button, 
  222.                                unsigned int any_mod, const char *action, const char *params);
  223.  
  224.    /* E current theme manipulation */
  225.    EAPI void         e_lib_theme_set                  (const char *category, const char *file);
  226.    EAPI void         e_lib_theme_get                  (const char *category);
  227.  
  228.    /* languages */
  229.    EAPI void         e_lib_language_set               (const char *lang);
  230.    EAPI void         e_lib_language_get               (void);
  231.  
  232.    /* E path information */
  233.    EAPI void         e_lib_data_dirs_list             (void);
  234.    EAPI void         e_lib_image_dirs_list            (void);
  235.    EAPI void         e_lib_font_dirs_list             (void);
  236.    EAPI void         e_lib_theme_dirs_list            (void);
  237.    EAPI void         e_lib_init_dirs_list             (void);
  238.    EAPI void         e_lib_icon_dirs_list             (void);
  239.    EAPI void         e_lib_module_dirs_list           (void);
  240.    EAPI void         e_lib_background_dirs_list       (void);
  241.  
  242. #ifdef __cplusplus
  243. }
  244. #endif
  245.  
  246. #endif
  247.